
class CreateAttachments < ActiveRecord::Migration[5.0]
  def change
    create_table :attachments do |t|
      t.string   :file
      t.integer  :user_id,           limit: 8
      t.integer  :file_size,         limit: 8
      t.string   :filename,          limit: 255
      t.string   :original_filename, limit: 255
      t.string   :content_type,      limit: 255
      t.string   :type,              limit: 255
      t.datetime :created_at,                    null: false
      t.datetime :updated_at,                    null: false
      t.integer  :width,             limit: 4
      t.integer  :height,            limit: 4

      t.timestamps
    end
  end
end
